﻿#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QDateTime>
#include <QComboBox>

MainWindow::MainWindow(QWidget* parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    tcpclient=new TcpClient();
    jq = new JQ();
    Colour_spectrum =new colour_spectrum();
    ui->stackedWidget->insertWidget(0, jq);
    ui->stackedWidget->insertWidget(1, Colour_spectrum);
    ui->stackedWidget->setCurrentIndex(0);
    connect(jq,&JQ::Switch_page_signal,this,&MainWindow::Switch_page_slot);


}

MainWindow::~MainWindow()
{
    delete ui;
    qDebug() << "mainwindow析构";

}
void MainWindow::Switch_page_slot(int index){
     ui->stackedWidget->setCurrentIndex(index);
};
